<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<h:head>
	<title>Detalle Carrito</title>
</h:head>
<h:body>
   <h:form >
	<h:dataTable value="#{tiendaMB.procarrito}" var="procarrito" >
		<h:column>
			<f:facet name="header">ID PRODUCTO</f:facet>
			<h:outputText value="#{procarrito.id}" />
		</h:column>
		<h:column>
			<f:facet name="header">NOMBRE</f:facet>
			<h:outputText value="#{procarrito.nombre}" />
		</h:column>
		<h:column>
			<f:facet name="header">CANTIDAD</f:facet>
			<h:outputText value="#{procarrito.cantidad}" />
		</h:column>
		<h:column>
			<f:facet name="header">PRECIO</f:facet>
			<h:outputText value="#{procarrito.precio}" />
		</h:column>
		<h:column>
			<f:facet name="header">ACCION</f:facet>
			<h:commandButton value="[+]" action="#{tiendaMB.addcant(procarrito.id)}"   />
			<h:commandButton value="[-]" action="#{tiendaMB.restcant(procarrito.id)}"/>
			<h:commandButton value="[del]" action="#{tiendaMB.delprod(procarrito)}"/>
		</h:column>
	</h:dataTable>
		<h:commandButton value="[buy]" action="#{tiendaMB.comprar()}"  />
</h:form>
<table width="50%" align="center" border="0">
			<tr>
				<td>Total $ : <h:outputText value="#{tiendaMB.obtenerTotal()}" /></td>
			
			</tr>
		</table>
</h:body>
</html>